const Mock = require("mockjs");

export default {
	"GET /api/system/dept/list": (req, res) => {
		const resc = {
			code: 200,
			data: [
				{
					id: "1",
					parentId: "0",
					label: "华南分部",
					date: "2022-10-10 08:00:00",
					remark: "",
					status: 1,
					sort: 1,
					children: [
						{
							id: "11",
							parentId: "1",
							label: "售前客服部",
							date: "2022-10-10 08:00:00",
							remark: "",
							status: 1,
							sort: 2,
						},
						{
							id: "12",
							parentId: "1",
							label: "技术研发部",
							date: "2022-10-10 08:00:00",
							remark: "软件开发&测试",
							status: 0,
							sort: 3,
						},
					],
				},
				{
					id: "2",
					parentId: "0",
					label: "华东分部",
					date: "2022-10-10 08:00:00",
					remark: "",
					status: 1,
					sort: 4,
					children: [
						{
							id: "21",
							parentId: "2",
							label: "售前客服部",
							date: "2022-10-10 08:00:00",
							remark: "",
							status: 1,
							sort: 5,
						},
						{
							id: "22",
							parentId: "2",
							label: "技术研发部",
							date: "2022-10-10 08:00:00",
							remark: "",
							status: 1,
							sort: 6,
						},
					],
				},
			],
			message: "",
		};
		return res.json(Mock.mock(resc));
	},
	"GET /api/system/user/list": (req, res) => {
		const resc = {
			code: 200,
			data: {
				total: 2,
				page: 1,
				pageSize: 20,
				summary: {
					id: "20",
					name: "999",
				},
				rows: [
					{
						id: "100",
						userName: "sakuya",
						avatar: "img/avatar.jpg",
						mail: "81883387@qq.com",
						name: "sakuya",
						group: ["1"],
						groupName: "超级管理员",
						dept: "11",
						date: "2021-10-10 12:00:00",
					},
					{
						id: "101",
						userName: "luhkpev",
						avatar: "img/avatar3.gif",
						mail: "k.luhkpev@zdgtfd.ma",
						name: "John Martinez",
						group: ["2", "4"],
						groupName: "业务管理员,发布人员",
						dept: "22",
						date: "2021-02-21 14:21:48",
					},
				],
			},
			message: "",
		};
		return res.json(Mock.mock(resc));
	},
	"GET /api/system/dic/tree": (req, res) => {
		const resc = {
			code: 200,
			data: [
				{
					id: "1",
					code: "notice",
					name: "通知类型",
				},
				{
					id: "2",
					code: "sex",
					name: "性别",
				},
				{
					id: "3",
					code: "menuCategory",
					name: "菜单类型",
				},
				{
					id: "4",
					code: "userType",
					name: "用户类型",
					children: [
						{
							id: "41",
							code: "userTypePC",
							name: "Desktop",
						},
						{
							id: "42",
							code: "userTypeAPP",
							name: "Mobile",
						},
					],
				},
			],
			message: "",
		};
		return res.json(Mock.mock(resc));
	},
	"GET /api/system/table/list": (req, res) => {
		const resc = {
			code: 200,
			data: {
				total: 2,
				page: 1,
				pageSize: 20,
				rows: [
					{
						id: "1",
						name: "用户列表",
						code: "userList",
					},
				],
			},
			message: "",
		};
		return res.json(Mock.mock(resc));
	},
	"GET /api/system/menu/list": (req, res) => {
		const resc = {
			code: 200,
			data: [
				{
					id: "00001",
					parentId: null,
					name: "system",
					path: "/system",
					meta: {
						title: "系统",
						icon: "el-icon-setting",
						type: "menu",
					},
					apiList: [
						{
							code: "system.list",
							url: "/api/system/list",
						},
					],
					component: "",
					children: [
						{
							id: "00001001",
							parentId: "00001",
							name: "user",
							path: "/system/user",
							meta: {
								title: "用户管理",
								icon: "el-icon-setting",
								type: "menu",
							},
							component: "",
							children: [
								{
									id: "00001001001",
									parentId: "00001001",
									name: "user.add",
									meta: {
										title: "新增",
										type: "button",
									},
								},
								{
									id: "00001001002",
									parentId: "00001001",
									name: "user.edit",
									meta: {
										title: "编辑",
										type: "button",
									},
								},
								{
									id: "00001001003",
									parentId: "00001001",
									name: "user.del",
									meta: {
										title: "删除",
										type: "button",
									},
								},
							],
						},
					],
				},
				{
					id: "00002",
					parentId: null,
					name: "other",
					path: "/other",
					meta: {
						title: "其他",
						icon: "el-icon-more",
						type: "menu",
					},
					component: "",
					children: [
						{
							id: "00002001",
							parentId: "00002",
							name: "directive",
							path: "/other/directive",
							meta: {
								title: "指令",
								icon: "el-icon-price-tag",
								type: "menu",
							},
							component: "",
							children: [
								{
									id: "00002001001",
									parentId: "00002001",
									name: "directive.add",
									meta: {
										title: "新增",
										type: "button",
									},
								},
								{
									id: "00002001002",
									parentId: "00002001",
									name: "directive.edit",
									meta: {
										title: "编辑",
										type: "button",
									},
								},
								{
									id: "00002001003",
									parentId: "00002001",
									name: "directive.del",
									meta: {
										title: "删除",
										type: "button",
									},
								},
							],
						},
					],
				},
			],
			message: "",
		};
		return res.json(Mock.mock(resc));
	},
	"GET /api/system/app/list": (req, res) => {
		const resc = {
			code: 200,
			data: {
				total: 2,
				page: 1,
				pageSize: 20,
				rows: [
					{
						id: "100",
						appName: "自助机",
						appId: "selfHelp",
						secret: "YuOju6lP3t4thLbZOhRSV4UZ79vdnwIC",
						type: ["ALL"],
						exp: "2035-01-01 00:00:00",
					},
					{
						id: "101",
						appName: "微信小程序",
						appId: "WechatApp",
						secret: "WgBbsRtCeXiNXIYkkShxxvqOGrAYKK2e",
						type: ["UPDATA", "QUERY"],
						exp: "2023-06-01 00:00:00",
					},
				],
			},
			message: "",
		};
		return res.json(Mock.mock(resc));
	},
	"GET /api/system/log/list": (req, res) => {
		const resc = {
			code: 200,
			data: {
				total: 85060,
				page: 1,
				pageSize: 20,
				rows: [
					{
						id: "640000198601284252",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "23.229.41.188",
						user: "蒋强",
						time: "1981-11-20 18:07:07",
					},
					{
						id: "150000198206131698",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "210.216.237.165",
						user: "龙军",
						time: "2001-02-02 15:29:06",
					},
					{
						id: "450000201001233581",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "500",
						cip: "170.80.45.236",
						user: "何超",
						time: "1991-01-03 01:40:19",
					},
					{
						id: "610000201003204768",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "500",
						cip: "142.254.87.149",
						user: "康芳",
						time: "1989-05-23 17:16:08",
					},
					{
						id: "140000201510292683",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "500",
						cip: "196.208.113.30",
						user: "彭娜",
						time: "2013-05-17 20:24:10",
					},
					{
						id: "320000197208301280",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "186.16.246.172",
						user: "贾明",
						time: "2021-08-13 13:16:25",
					},
					{
						id: "610000201611036382",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "113.115.14.58",
						user: "吴娜",
						time: "2022-05-01 21:47:05",
					},
					{
						id: "410000199906254785",
						level: "info",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "500",
						cip: "168.16.111.218",
						user: "乔敏",
						time: "1977-03-23 01:14:42",
					},
					{
						id: "640000201812135489",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "200",
						cip: "45.29.61.58",
						user: "汪艳",
						time: "1976-02-22 14:59:44",
					},
					{
						id: "410000201211086930",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "500",
						cip: "95.191.17.110",
						user: "孟芳",
						time: "2006-06-06 14:52:00",
					},
					{
						id: "610000200507132775",
						level: "info",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "401",
						cip: "117.206.92.48",
						user: "龙艳",
						time: "1985-07-15 20:55:13",
					},
					{
						id: "130000200211276863",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "200",
						cip: "172.221.250.216",
						user: "周芳",
						time: "1970-09-01 10:47:14",
					},
					{
						id: "130000201808021171",
						level: "info",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "200",
						cip: "247.127.59.40",
						user: "常杰",
						time: "2017-07-08 02:05:40",
					},
					{
						id: "630000197412269268",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "200",
						cip: "136.210.99.123",
						user: "董霞",
						time: "1979-04-18 18:34:32",
					},
					{
						id: "410000202303194562",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "200",
						cip: "95.143.65.124",
						user: "乔霞",
						time: "2000-11-20 08:19:18",
					},
					{
						id: "360000198409253707",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "200",
						cip: "246.127.106.135",
						user: "程涛",
						time: "2018-09-05 23:08:39",
					},
					{
						id: "710000197912095954",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "24.149.65.124",
						user: "廖芳",
						time: "1970-06-30 19:08:31",
					},
					{
						id: "650000198107267547",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "500",
						cip: "111.165.193.141",
						user: "彭军",
						time: "1998-01-29 17:37:56",
					},
					{
						id: "630000200506289184",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "500",
						cip: "74.129.127.102",
						user: "雷平",
						time: "1995-03-07 05:24:55",
					},
					{
						id: "620000199305250163",
						level: "info",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "194.143.8.192",
						user: "邓霞",
						time: "2008-07-14 02:57:08",
					},
				],
			},
			message: "",
		};
		return res.json(Mock.mock(resc));
	},
    "GET /api/system/role/list2": (req, res) => {
		const resc = {
			code: 200,
			data: {
				total: 85060,
				page: 1,
				pageSize: 20,
				rows: [
					{
						id: "640000198601284252",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "23.229.41.188",
						user: "蒋强",
						time: "1981-11-20 18:07:07",
					},
					{
						id: "150000198206131698",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "210.216.237.165",
						user: "龙军",
						time: "2001-02-02 15:29:06",
					},
					{
						id: "450000201001233581",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "500",
						cip: "170.80.45.236",
						user: "何超",
						time: "1991-01-03 01:40:19",
					},
					{
						id: "610000201003204768",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "500",
						cip: "142.254.87.149",
						user: "康芳",
						time: "1989-05-23 17:16:08",
					},
					{
						id: "140000201510292683",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "500",
						cip: "196.208.113.30",
						user: "彭娜",
						time: "2013-05-17 20:24:10",
					},
					{
						id: "320000197208301280",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "186.16.246.172",
						user: "贾明",
						time: "2021-08-13 13:16:25",
					},
					{
						id: "610000201611036382",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "113.115.14.58",
						user: "吴娜",
						time: "2022-05-01 21:47:05",
					},
					{
						id: "410000199906254785",
						level: "info",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "500",
						cip: "168.16.111.218",
						user: "乔敏",
						time: "1977-03-23 01:14:42",
					},
					{
						id: "640000201812135489",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "200",
						cip: "45.29.61.58",
						user: "汪艳",
						time: "1976-02-22 14:59:44",
					},
					{
						id: "410000201211086930",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "500",
						cip: "95.191.17.110",
						user: "孟芳",
						time: "2006-06-06 14:52:00",
					},
					{
						id: "610000200507132775",
						level: "info",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "401",
						cip: "117.206.92.48",
						user: "龙艳",
						time: "1985-07-15 20:55:13",
					},
					{
						id: "130000200211276863",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "200",
						cip: "172.221.250.216",
						user: "周芳",
						time: "1970-09-01 10:47:14",
					},
					{
						id: "130000201808021171",
						level: "info",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "200",
						cip: "247.127.59.40",
						user: "常杰",
						time: "2017-07-08 02:05:40",
					},
					{
						id: "630000197412269268",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "200",
						cip: "136.210.99.123",
						user: "董霞",
						time: "1979-04-18 18:34:32",
					},
					{
						id: "410000202303194562",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "200",
						cip: "95.143.65.124",
						user: "乔霞",
						time: "2000-11-20 08:19:18",
					},
					{
						id: "360000198409253707",
						level: "error",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "200",
						cip: "246.127.106.135",
						user: "程涛",
						time: "2018-09-05 23:08:39",
					},
					{
						id: "710000197912095954",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "24.149.65.124",
						user: "廖芳",
						time: "1970-06-30 19:08:31",
					},
					{
						id: "650000198107267547",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "500",
						cip: "111.165.193.141",
						user: "彭军",
						time: "1998-01-29 17:37:56",
					},
					{
						id: "630000200506289184",
						level: "warn",
						name: "用户登录",
						url: "/oauth/token",
						type: "POST",
						code: "500",
						cip: "74.129.127.102",
						user: "雷平",
						time: "1995-03-07 05:24:55",
					},
					{
						id: "620000199305250163",
						level: "info",
						name: "用户登录",
						url: "/oauth/token",
						type: "GET",
						code: "401",
						cip: "194.143.8.192",
						user: "邓霞",
						time: "2008-07-14 02:57:08",
					},
				],
			},
			message: "",
		};
		return res.json(Mock.mock(resc));
	},
};
